# Maintainer: Peter Budai <peterbudai at hotmail dot com>

_realname=Unicode-GCString
_filename=Unicode-LineBreak
pkgname=perl-${_realname}
pkgver=2018.003
pkgrel=2
pkgdesc="Unicode::GCString - String as Sequence of UAX #29 Grapheme Clusters"
arch=('any')
url="https://metacpan.org/${_realname}/"
groups=("perl-modules")
license=('GPL' 'PerlArtistic')
depends=("perl" "perl-MIME-Charset" "libcrypt")
makedepends=("libcrypt-devel")
options=('!emptydirs')
source=(https://www.cpan.org/authors/id/N/NE/NEZUMI/${_filename}-${pkgver}.tar.gz)
sha256sums=('860c92ff3e710f0a1ca3e7067dba3734540dfb5cb932936536225f7ffca571b1')

prepare() {
  cd "${srcdir}/${_filename}-${pkgver}"
}

build() {
  cd "${srcdir}/${_filename}-${pkgver}"

  perl Makefile.PL INSTALLDIRS=vendor
  make
}

check() {
  cd "${srcdir}/${_filename}-${pkgver}"
  make test
}

package() {
  cd "${srcdir}/${_filename}-${pkgver}"
  make install DESTDIR=${pkgdir}
}
